package dynamic_proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class DynamicProxyHttpProxy implements InvocationHandler {


    private Object object;

    public DynamicProxyHttpProxy(Object object) {
        this.object = object;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("before invoke..." + object.getClass().getSimpleName());

        method.invoke(object, args);

        System.out.println("after invoke..." + object.getClass().getSimpleName());


        return null;
    }
}
